import instance from './config'

// 封装GET请求
export const get = (url, params = {}) => {
  return instance({
    method: 'get',
    url,
    params
  })
}

// 封装POST请求
export const post = (url, data = {}) => {
  return instance({
    method: 'post',
    url,
    data
  })
}

// 封装PUT请求
export const put = (url, data = {}) => {
  return instance({
    method: 'put',
    url,
    data
  })
}

// 封装DELETE请求
export const del = (url, data = {}) => {
  return instance({
    method: 'delete',
    url,
    data
  })
}